


CXX=@CXX@
CXXFLAGS=@CXXFLAGS@ 
LIBS=@LIBS@

install=@INSTALL@

prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@

PERL=@PERL@


TARGETS=func_hyper \
	func_wilcoxon \
	func_binom \
	func_2x2contingency \
	func_separate_taxonomies_embl.pl \
	func_category_statistics.pl \
	func_category_groups.pl \
	func_mtc

all: $(TARGETS)

func_hyper: func_hyper.in 
	sed -e "s|@BINPATH@|$(bindir)|" func_hyper.in >func_hyper

func_wilcoxon: func_wilcoxon.in 
	sed -e "s|@BINPATH@|$(bindir)|" func_wilcoxon.in >func_wilcoxon

func_binom: func_binom.in
	sed -e "s|@BINPATH@|$(bindir)|" func_binom.in >func_binom

func_2x2contingency: func_2x2contingency.in
	sed -e "s|@BINPATH@|$(bindir)|" func_2x2contingency.in >func_2x2contingency

func_mtc: func_mtc.o ../common/overall_sign.o
	$(CXX) $(CXXFLAGS) -o func_mtc func_mtc.o ../common/overall_sign.o

%.o: %.cc %.h
	$(CXX) $(CXXFLAGS) -o $@ -c $<

func_%: func_%.in
	sed -e "s|@PERLPATH@|$(PERL)|" $< >$@


install: 
	$(install) -m 755 func_hyper $(bindir)
	$(install) -m 755 func_mtc $(bindir)
	$(install) -m 755 func_wilcoxon $(bindir)
	$(install) -m 755 func_binom $(bindir)
	$(install) -m 755 func_2x2contingency $(bindir)
	$(install) -m 755 func_separate_taxonomies_embl.pl $(bindir)
	$(install) -m 755 func_category_statistics.pl $(bindir)
	$(install) -m 755 func_category_groups.pl $(bindir)

clean:
	rm -f $(TARGETS) func_mtc.o

dist-clean:
	rm -f Makefile 
